package com.kate.mall.bff.wx.feign;

import com.kate.mall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("product-center")
public interface ProductFeignClient {
    @GetMapping("/product/brand/list")
     R brandList(@RequestParam(required = false) Map<String, Object> params);
    @GetMapping("/product/goods/list")
    R hotGoodsList(@RequestParam(required = false) Map<String, Object> params);
    @GetMapping("/product/goods/list")
    R newGoodsList(@RequestParam(required = false) Map<String, Object> params);

    @GetMapping("/product/goodsspecification/list")
    R goodsSpecificationsList(@RequestParam(required = false) Map<String, Object> params);

    @GetMapping("/product/goods/info/{id}")
    R getGoodsInfo(@PathVariable("id") Integer goodsId);

    @GetMapping("/product/goodsattribute/list")
    R findAtrributeRelateGoods(@RequestParam("goods_id") Integer id);

    @GetMapping("/product/comment/list")
    R getCommentRelateGoods(@RequestParam("goods_id")Integer id);

    @GetMapping("/product/brand/list")
    R goodsBrandRelateGoods(@RequestParam("goods_id") Integer id);

    @GetMapping("/product/goodsproduct/list")
    R productListRelatedGoods(@RequestParam("goods_id") Integer id);

    @GetMapping("/product/goods/info/{id}")
    R detail(@PathVariable("id") Integer id);


    @GetMapping("/product/goodsproduct/info/{productId}")
    R findProductById(@PathVariable("productId") Integer productId);
}
